<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<fmt:setBundle basename="message" />
<title><fmt:message key="vbtitle" /></title>
</head>
<body>
<h1><fmt:message key="vbtitle" /></h1>
<table>
	<tr>
		<th><fmt:message key="label.booking.number" /></th>
		<th><fmt:message key="label.booking.facilityname" /></th>
		<th><fmt:message key="label.booking.fromdate"/></th>
		<th><fmt:message key="label.booking.todate"/></th>
		<th><fmt:message key="label.booking.status"/></th>		
	</tr>
	<c:forEach var="booking" items="${currentbookings}" varStatus="status">
	<tr>
		<td>${status.index+1}</td>
		<td>${booking.facilityName}</td>
		<td>${booking.fromDate}</td>
		<td>${booking.toDate}</td>
		<td>${booking.status}</td>
		<td>
			<c:url var="detailurl" scope="page" value="/bookingdetails.jsp">
				<c:param name="facilityName" value="${booking.facilityName}" />
				<c:param name="fromDate" value="${booking.fromDate}" />
				<c:param name="toDate" value="${booking.toDate}" />
				<c:param name="status" value="${booking.status}" />
				<c:param name="priorityID" value="${booking.priorityID}"/>
                <c:param name="reason" value="${booking.reason}"/>
			</c:url>
			<a href="${detailurl}"><fmt:message key="details" /></a>		
		</td>
	</tr>
	</c:forEach>
</table>

</body>
</html>